package com.scott.crm.student.dao;

import com.scott.crm.clazz.bean.ClazzBean;
import com.scott.crm.student.bean.StudentBean;
import com.scott.crm.student.entity.StudentEntity;
import com.scott.crm.user.bean.UserBean;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.stereotype.Repository;
import tk.mybatis.mapper.common.BaseMapper;

@Mapper
@Repository
public interface StudentDao extends BaseMapper<StudentBean> {

    /*
     * 方法描述:通过学生ID找到对应班级
     * @author: 尹泳超
     * @date: 2021/11/29 20:41
     * @params: [studentId]
     * @returns:ClazzBean
     */
    ClazzBean findClassByStudentID(Integer studentId);


    /*
     * 方法描述:通过学生ID找到老师
     * @author: 尹泳超
     * @date: 2021/11/29 20:42
     * @params: [classId]
     * @returns:UserBean
     */
    UserBean findTeacherByClazzID(Integer classId);

    /*
     * 方法描述:通过学生ID找到他的个人信息
     * @author: 尹泳超
     * @date: 2021/11/29 20:43
     * @params: [studentId]
     * @returns:com.scott.crm.student.entity.StudentEntity
     */
    StudentEntity findStudentMessageByStudentId(Integer studentId);

    /*
     * 方法描述:统计ID的的数量
     * @author: 尹泳超
     * @date: 2021/12/1 15:31
     * @params: [userId]
     * @returns:java.lang.Integer
     */
    Integer countStudentById(Integer userId);


    ClazzBean findClassByStudentId(Integer userId);

    UserBean findTeacherByClassId(Integer classId);


}
